<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta name="format-detection" content="telephone=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="johnye">
<meta name="copyright" content="">
<meta name="description" content="">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title></title>
<link type="text/css" rel="stylesheet" href="youxi/css/common.css">
<link type="text/css" rel="stylesheet" href="youxi/css/aui.css">
<link type="text/css" rel="stylesheet" href="youxi/css/aui2.css">
<link type="text/css" rel="stylesheet" href="youxi/css/end.css">

<link type="text/css" rel="stylesheet" href="youxi/css/plays.css">
<link type="text/css" rel="stylesheet" href="youxi/css/room_pipei.css">
<script type="text/javascript" src="youxi/js/jquery-1.8.2.min.js"></script>
<style type="text/css">
	.jf {
		position: absolute;
		top: -30px;
		left: 15px;
	}
	
	.touzi {
		animation: touzi 1s ease infinite;
		animation-fill-mode: forwards;
	}
	
	@keyframes touzi {
		30% {
			transform: scale(1.2)
		}
		40%,
		60% {
			transform: scale(1.2)rotate(-20deg)
		}
		50% {
			transform: scale(1.2) rotate(20deg);
		}
		70% {
			transform: scale(1.2) rotate(0deg);
		}
		100% {
			transform: scale(1);
		}
	}
	
	.ired {
		position: absolute;
		display: block;
		width: 12px;
		height: 12px;
		background: red;
		border-radius: 50%;
		top: 20px;
		left: 26px;
	}
</style>
<script>
var ws;
function init() {
	var host = "ws://47.104.8.67:8282";
	try {
		ws = new WebSocket(host);
		ws.onopen = function(){
			console.log('连接成功');
			ws.send("login:{$data.user.id}");
			//ws.send("loginout:{$data.vsuser.id}-0");
			console.log('发送登陆数据完毕');
		};
		ws.onmessage = function (e) { 
			
			//监听对手出牌
			if(e.data.indexOf("gamecontent")>=0){
				var n=e.data.split("-");
				//alert(n[1]);
				$("#vscontent").val(n[1]);
				
				//写入对方5个点
				var icons_zhi = ["&#xe607", "&#xe611", "&#xe60b", "&#xe612", "&#xe609", "&#xe60a"];
				var n1arr=n[1].split("|");
				for (var i=1;i<6;i++){
					$("#vs_x"+i).html(icons_zhi[n1arr[i-1]-1]);
				}
				
				if($("#vscontent").val()!=0 && $("#game_content").val()!=0){
					console.log('双方骰子已经准备好');
					//暂定 首次first
					if({$data.user.id}=={$data.first}){
						$(".master").show();
					}else{
						$(".slave").show();
					}
				}
			}
			//监听叫点 骰子个数和点数
			if(e.data.indexOf("gameshaizi")>=0){
				$("#miao1").html(99999);
				$("#miao2").html(99999);
				var n=e.data.split("-");
				var nn=n[1].split("|");
				//alert(n[1]);
				$("#game_p_vs_geshu").val(nn[0]);
				$("#game_p_vs_dianshu").val(nn[1]);
				//判断 点1 是否被用
				if(nn[1]==1){
					$('#flag').val(1);
				}
				
				$('#vs_qipao').html(nn[0]+"个"+nn[1]);
				$('#vs_qipao').show();
				$('#my_qipao').hide();
				//叫点以后容器切换
				if( $(".master").is(":hidden") ){
					$('.master').show();
					$('.slave').hide();
				}else{
					$('.master').hide();
					$('.slave').show();
				}
			}
			//监听开骰
			if(e.data.indexOf("shaiziok")>=0){
				fun("监听开骰");
			}
			//监听小局上报结果
			if(e.data=="gameend-1"){
				window.location.href="index.php?ctl=game&act=doing&deal_id={$data.deal_id}";
			}
			console.log('监听消息:'+e.data);
		};
		ws.onclose = function (msg) {
			console.log('关闭连接');
		};
	}
	catch (ex) {
		console.log(ex);
	}
}init();

function send(msg) {
	try { 
		ws.send(msg); 
	} catch (ex) { 
		console.log(ex);
	}
}
//刷新或关闭
window.onbeforeunload = function () {
	try {
		//ws.send("loginout:{$data.vsuser.id}-1");
		ws.close();
		ws = null;
	}
	catch (ex) {
		console.log(ex);
	}
};
</script>

</head>

<body>

<header class="header">
 <div class="lf left_menus"><a href="javascript:alert('游戏过程禁止退出');" id="left_menus_cont"><i class="iconfont fontcolor4 f20">&#xe610;</i></a></div>
 <div class="lf logos">房间号：{$data.deal_id}</div>

</header>
<!--header end-->
<div class="main_warp"> 

	<div class="tg_other fixed_top" style="display:none">
		<div class="tg_other_lf lf">
			<img src="{$data.vsuser.user_logo}">
		</div>

		<div class="tg_other_rt rt">
			<ul class="tg_nav">
			<li>名称：<span>{$data.vsuser.user_name}</span></li>
			<li>ID：<span>{$data.vsuser.id}</span></li>
			<li>江湖段位：<span>{$data.vsuser.total_score}</span></li>
			<li>当前胜率：<span>70%</span></li>     
			<div class="clear"></div>
			</ul>
		</div>

		<div class="clear"></div>  
	</div>
	<div class="jiudiv jiutop" id="vsjiuping"  style="display:none">
		<img src="youxi/images/jiu.png" >
		<img src="youxi/images/jiu.png">
	</div>
	<!--对方 end-->

	<div class="jiudiv jiubottom" id="myjiuping"  style="display:none">
		<img src="youxi/images/jiu.png">
		<img src="youxi/images/jiu.png">
	</div>
	<div class="tg_other fixed_bottom"  style="display:none">
	<div class="tg_other_lf rt">
		<img src="{$data.user.user_logo}">
	</div>

	<div class="tg_other_rt rt">
		<ul class="tg_nav">
		<li>名称：<span>{$data.user.user_name}</span></li>
		<li>ID：<span>{$data.user.id}</span></li>
		<li>江湖段位：<span>{$data.user.total_score}</span></li>
		<li>当前胜率：<span>70%</span></li>
		<div class="clear"></div>
		</ul>
	</div>

	<div class="clear"></div>  
	</div>
	
	<script>
	if (!localStorage.zhan){
		localStorage.zhan=1;
	}
   if (!localStorage.fangqi){
		localStorage.fangqi=0;
	}else{		
		//我掉个酒瓶子
		$(".jiubottom").find("img").each(function(k,v){ 
			if(localStorage.fangqi>k){
				$(v).addClass("jiu");
			}
		});
	}
   if (!localStorage.shu){
		localStorage.shu=0;
	}else{
		//我掉个酒瓶子
		$(".jiubottom").find("img").each(function(k,v){ 
			if(localStorage.shu>k){
				$(v).addClass("jiu");
			}
		});
	}
   if (!localStorage.ying){
		localStorage.ying=0;
	}else{
		//对方掉酒瓶子
		$(".jiutop").find("img").each(function(k,v){ 
			if(localStorage.ying>k){
				$(v).addClass("jiu");
			}
		});
	}
	//正常动画
	function donghua2(){
		$(".fixed_top").show();
		$(".jiutop").show();
		$(".fixed_bottom").show();	
		$(".jiubottom").show();
		setTimeout(function(){ 
			$("#content0").hide();	
			$("#content1").show();
		},500);
	}	

	donghua2();
	</script>

	   <!--游戏页面 2 手势-->
		<div class="play_center_cont" id="content2" style="">
			<div class="shaizhong touzi">
				<img src="youxi/images/play_shaizhong.png">
			</div>
			<div class="shaizi_top" style="display: none;">
				<ul>
					<li><span class="wh_icons"><i id="vs_x1" class="iconfont fontcolor3">&#xe607;</i></span></li>
					<li><span class="wh_icons"><i id="vs_x2" class="iconfont fontcolor3">&#xe611;</i></span></li>
					<li><span class="wh_icons"><i id="vs_x3" class="iconfont fontcolor3">&#xe60b;</i></span></li>
					<li><span class="wh_icons"><i id="vs_x4" class="iconfont fontcolor3">&#xe612;</i></span></li>
					<li><span class="wh_icons"><i id="vs_x5" class="iconfont fontcolor3">&#xe609;</i></span></li>

				</ul>
			</div>
			<!---shaizi_top the end-->
			<div class="master" style="display:none">
				<div class="tishiyu"></div>
				<div class="clear"></div>
				<div class="daojishi" ><p style="margin: -44px 0;" id="miao1">20</p></div>
				<div class="shaizi_cont_end" style="margin-top: 62px;">
					<div>
						<div style="width:12%; float:left; padding-top:10px; color:#373e4a;">个数</div>
						<ul class="shanzi_num geshu">
							<li class="red_border"  id="geshu2" onclick="geshu(2)"><span class="wh_icons sz_number"><i class="fontcolor3">2</i></span></li>
							<li class="" id="geshu3" onclick="geshu(3)"><span class="wh_icons sz_number"><i class="fontcolor3">3</i></span></li>
							<li class="" id="geshu4" onclick="geshu(4)"><span class="wh_icons sz_number"><i class="fontcolor3">4</i></span></li>
							<li class="" id="geshu5" onclick="geshu(5)"><span class="wh_icons sz_number"><i class="fontcolor3">5</i></span></li>
							<li class="" id="geshu6" onclick="geshu(6)"><span class="wh_icons sz_number"><i class="fontcolor3">6</i></span></li>
							<li class="" id="geshu7" onclick="geshu(7)"><span class="wh_icons sz_number"><i class="fontcolor3">7</i></span></li>
							<li class="" id="geshu8" onclick="geshu(8)"><span class="wh_icons sz_number"><i class="fontcolor3">8</i></span></li>
							<li class="" id="geshu9" onclick="geshu(9)"><span class="wh_icons sz_number"><i class="fontcolor3">9</i></span></li>
							<li class="" id="geshu10" onclick="geshu(10)"><span class="wh_icons sz_number"><i class="fontcolor3">10</i></span></li>
						</ul>
					</div>

					<div>
						<div style="width:12%; float:left; padding-top:10px; color:#373e4a;">点数</div>
						<ul class="shanzi_num dianshu">
							<li class="red_border" id="dianshu1" onclick="dianshu(1)"><span class="wh_icons sz_number2"><i class="iconfont fontcolor3">&#xe607;</i></span></li>
							<li class="" id="dianshu2" onclick="dianshu(2)"><span class="wh_icons sz_number2"><i class="iconfont fontcolor3">&#xe611;</i></span></li>
							<li class="" id="dianshu3" onclick="dianshu(3)"><span class="wh_icons sz_number2"><i class="iconfont fontcolor3">&#xe60b;</i></span></li>
							<li class="" id="dianshu4" onclick="dianshu(4)"><span class="wh_icons sz_number2"><i class="iconfont fontcolor3">&#xe612;</i></span></li>
							<li class="" id="dianshu5" onclick="dianshu(5)"><span class="wh_icons sz_number2"><i class="iconfont fontcolor3">&#xe609;</i></span></li>
							<li class="" id="dianshu6" onclick="dianshu(6)"><span class="wh_icons sz_number2"><i class="iconfont fontcolor3">&#xe60a;</i></span></li>
						</ul>
					</div>

				</div>
				<!--content结束-->
				<div class="ant_sure" style="margin-top:24px ;" id="pdiv">
					<a href="#" onclick="jiaodian()"><img style="width: 23%;margin: 0 20px;" src="youxi/images/jiaodian.png"></a>
					<a href="#" onclick="kaishai()"><img class="kaishai" style="width: 23%;margin: 0 20px;" src="youxi/images/kaishai.png"></a>
				</div>
				<!--叫点 开骰结束-->
			</div>
			
			<div class="slave" style="display:none">	
				<div class="tishiyu" style="margin: 150px 0 60px;">
					<img src="images/rzjh.png">
					<a href="#" id="xinxikuang">请等待对方操作</a>
				</div>
				<div class="daojishi">
					<p style="margin:-8px;" id="miao2">20</p>
				</div>
			</div>
			
			<div id="my_qipao" style="display:none;background:url('youxi/images/chat_jif.png') no-repeat;background-size:100%;width:70px;height:50px;position:absolute;right:80px;bottom:54px;font:16px/24px '';padding-left:10px;">
 			对方发言
			</div>
			<div id="vs_qipao" style="display:none;background:url('youxi/images/chat_duif.png') no-repeat;background-size:100%;width:70px;height:50px;margin-top:65px;position:absolute;left:80px;top:54px;font:16px/24px '';padding:10px 0 0 10px;">
			自己发言
			</div>
			<div class="shaizi_bottom">
				<ul>
					<li><span class="wh_icons"><i id="my_x1" vr="" class="iconfont fontcolor3">&#xe607;</i></span></li>
					<li><span class="wh_icons"><i id="my_x2" vr="" class="iconfont fontcolor3">&#xe611;</i></span></li>
					<li><span class="wh_icons"><i id="my_x3" vr="" class="iconfont fontcolor3">&#xe60b;</i></span></li>
					<li><span class="wh_icons"><i id="my_x4" vr="" class="iconfont fontcolor3">&#xe612;</i></span></li>
					<li><span class="wh_icons"><i id="my_x5" vr="" class="iconfont fontcolor3">&#xe609;</i></span></li>
				</ul>
			</div>
			<!---shaizi_bottom the end-->
		
		</div>
		<div id="tishi" class="tishi" style="display: none;"><div id="tishi_queding" class="tishi1" onclick="$('#tishi').hide()">确定</div></div>
		<input type="hidden" value="0" id="game_content" />
		<input type="hidden" value="0" id="vscontent" />
		<input type="hidden" value="{$data.first}" id="first_userid" />
		<input type="hidden" value="0" id="flag" />
		
		<input type="hidden" value="2" id="game_p_geshu" />
		<input type="hidden" value="1" id="game_p_dianshu" />
		
		<input type="hidden" value="0" id="game_p_vs_geshu" />
		<input type="hidden" value="0" id="game_p_vs_dianshu" />
		
		<input type="hidden" id="data_id" value="{$data.deal_id}"/>
		<script>
		//begin 晃动并确定骰子
		var icons_zhi = ["&#xe607", "&#xe611", "&#xe60b", "&#xe612", "&#xe609", "&#xe60a"];
		var icons_id = ["#my_x1", "#my_x2", "#my_x3", "#my_x4", "#my_x5", "#my_x6"]
		var state = 0;
		function icon_dh() {
			for(var i = 0; i < 6; i++) {
				var a = parseInt(6*Math.random());
				var icons_idshu = icons_id[i];
				$(icons_idshu).html(icons_zhi[a]);
				$(icons_idshu).attr("vr",a+1);
			}
			state++;

			if(state >= 30) {
				clearInterval(begin_timer);
				$(".shaizhong").removeClass("jiu");
				$(".shaizhong").animate({opacity: 0});
				$(".shaizhong").hide();
				//确定自己的骰子
				var game_content=$("#my_x1").attr("vr")+"|"+$("#my_x2").attr("vr")+"|"+$("#my_x3").attr("vr")+"|"+$("#my_x4").attr("vr")+"|"+$("#my_x5").attr("vr");
				$("#game_content").val(game_content);
				//发送监听数据 骰子
				send("gamecontent:{$data.vsuser.id}-"+game_content);
				//暂定 首次first
				if({$data.user.id}=={$data.first}){
					$(".master").show();
				}else{
					$(".slave").show();
				}
				dumiao("非单页应用");
			}
		}
		var begin_timer = setInterval(icon_dh, 100);

		//个数2-10
		function geshu(num){
			$("#game_p_geshu").val(num);
			$(".geshu").find('li').each(function(k,v){  
				$(v).attr("class","");
			});
			$("#geshu"+num).attr("class","red_border");
		}
		//点数1-6
		function dianshu(num){
			$("#game_p_dianshu").val(num);
			$(".dianshu").find('li').each(function(k,v){  
				$(v).attr("class","");
			});  
			$("#dianshu"+num).attr("class","red_border");
		}
		//叫点
		function jiaodian(){
			
			var my_geshu=$("#game_p_geshu").val();
			var my_dianshu=$("#game_p_dianshu").val();

			var vs_geshu=$("#game_p_vs_geshu").val();
			var vs_dianshu=$("#game_p_vs_dianshu").val();
			if(vs_geshu!=0){
				if(my_geshu*1<vs_geshu*1){
					//alert("个数必须大于对方叫的个数 或 相同个数点数必须大于对方点数（1除外）");
					$("#tishi_queding").html("个数必须大于对方叫的个数 或 相同个数点数必须大于对方点数（1除外）");
					$("#tishi").show();
					return;
				}
				if(my_geshu*1==vs_geshu*1){
					if(my_dianshu==1){
						my_dianshu_tmp=7
					}else{
						my_dianshu_tmp=my_dianshu;
					}
					if(vs_dianshu==1){
						vs_dianshu_tmp=7;
					}else{
						vs_dianshu_tmp=vs_dianshu;
					}
					if( my_dianshu_tmp<=vs_dianshu_tmp ){
						//alert("个数一样，点数必须大于对方点数（1除外）");
						$("#tishi_queding").html("个数一样，点数必须大于对方点数（1除外）");
						$("#tishi").show();
						return;
					}
				}
			}
			//判断 点1 是否被用
			if(my_dianshu==1){
				$('#flag').val(1);
			}
			$('#my_qipao').html(my_geshu+"个"+my_dianshu);
			$('#my_qipao').show();
			$('#vs_qipao').hide();
			$("#miao1").html(99999);
			$("#miao2").html(99999);
			send("gameshaizi:{$data.vsuser.id}-"+my_geshu+"|"+my_dianshu);
			//叫点以后容器切换
			if( $(".master").is(":hidden") ){
				$('.master').show();
				$('.slave').hide();
			}else{
				$('.master').hide();
				$('.slave').show();
			}

		}
		//开骰
		function kaishai(){
			var data_id=$("#data_id").val();
			if( $("#game_p_vs_geshu").val()==0 ){
				// alert("这也能开骰？");
				$("#tishi_queding").html("这也能开骰？");
				$("#tishi").show();
				return;
			}
			send("shaiziok:{$data.vsuser.id}-1");
			fun("开骰");
		}
		//读秒
		function dumiao(txt){
			console.log("dumiao:"+txt);
			//读秒前重置出拳
			$("#miao1").html(99999);
			$("#miao2").html(99999);
			$('#pdiv').show();       
			var tim2=setInterval(function (){
                var num=$("#miao1").html();
				num--;         
                $("#miao1").html(num);
				$("#miao2").html(num);
				if(num==1){
					$('#pdiv').hide();
				}
                if(num<1){   	
					clearInterval(tim2);
                }
            },1000);       
		}
		//校验
		function fun(txt){
			//隐藏游戏区
			$(".master").hide();
			$(".slave").hide();
			//显示对方骰子
			$(".shaizi_top").show();
			
			//显示对话框
			$(".slave").show();
			$(".daojishi").hide();
			$("#xinxikuang").html("双方公布结果");
			
			$("#miao1").html(-1);
			$("#miao2").html(-1);
			console.log('fun'+txt);
			$("#huihe_num1").html(localStorage.zhan);
			$("#huihe_num2").html(localStorage.zhan);
			var data_id=$("#data_id").val();
			
			//console.log(data);return;
			var jiaoyanstr=$("#game_content").val()+"|"+$("#vscontent").val();
			var flag=$("#flag").val();
			var my_ying=0;
			var my_shu=0;
			if(txt=="开骰"){
				var geshu = $("#game_p_vs_geshu").val();//对方个数
				var dianshu = $("#game_p_vs_dianshu").val();//对方点数
				
				var right_geshu=(jiaoyanstr.split(dianshu)).length-1;
				if(flag==0){
					right_geshu+=(jiaoyanstr.split("1")).length-1;
				}
				
				if(right_geshu>geshu*1 || geshu*1==right_geshu){
					my_shu=1;
				}else{
					my_ying=1;
				}		
				console.log("骰子信息："+geshu+"个"+dianshu+",这样的点数共有"+right_geshu+"个,赢："+my_ying+"，输："+my_shu);
			}else{	
				var geshu = $("#game_p_geshu").val();//我的个数
				var dianshu = $("#game_p_dianshu").val();//我的点数
				
				var right_geshu=(jiaoyanstr.split(dianshu)).length-1;
				if(flag==0){
					right_geshu+=(jiaoyanstr.split("1")).length-1;
				}
				if(right_geshu>geshu*1 || geshu*1==right_geshu){
					my_ying=1;
				}else{
					my_shu=1;
				}
				console.log("监听骰子信息："+geshu+"个"+dianshu+",这样的点数共有"+right_geshu+"个,赢："+my_ying+"，输："+my_shu);
			}
			
			if( my_shu==1 ){
				console.log("我输了");
				//return;
				setTimeout(function(){	
					//我输
					localStorage.zhan=Number(localStorage.zhan) +1;
					localStorage.shu=Number(localStorage.shu) +1;
					
					//我掉个酒瓶子
					$(".jiubottom").find("img").each(function(k,v){ 
						if(localStorage.shu>k){
							$(v).addClass("jiu");
						}
					});
					
					if(localStorage.shu>1){
						//大局输
						console.log("3战大局输");
						//退出房间
						//反向动画效果
						setTimeout(function(){
							setTimeout(function(){
								$(".said_stop").show();//大输
								del_localStorage();
								
								//失败之后 5秒转首页
								setTimeout(function(){
									window.location.href="index.php";											
								},5000);
								
							},1500);
						},1500);
					}else{
						//alert('此战输，重新选择游戏类型');
						//小输情况下，输的人负责发送监听数据
						//反向动画效果
						setTimeout(function(){
							setTimeout(function(){
								$(".huihe_lose").show();//小输
							},1500);
						},500);
						
						//重置master 只需选一个
						$.ajax({
							url:'index.php?ctl=game&act=ajaxvsresult',
							type:'POST',
							async: false,
							data: 'deal_id='+ data_id +'&rnum='+ Math.random(),
							dataType: "json",
							success: function(data){
								setTimeout(function(){
									send("gameend:{$data.vsuser.id}-1");
									window.location.href="index.php?ctl=game&act=doing&deal_id={$data.deal_id}";
								},3000);
							},
							error: function(){
								//alert("系统错误，请联系管理员");
							}
						});	
					}
					return;
				},5000);
			}
			if( my_ying==1 ){
				console.log("我赢了");
				//return;
				setTimeout(function(){
					//我赢
					localStorage.zhan=Number(localStorage.zhan) +1;
					localStorage.ying=Number(localStorage.ying) +1;
					
					//对面掉个酒瓶子
					$(".jiutop").find("img").each(function(k,v){ 
						if(localStorage.ying>k){
							$(v).addClass("jiu");
						}
					});
					if(localStorage.ying>1){
						//大局赢
						console.log("3战大局赢");
						if(<?print_r($this->_var['data']['saiduan_num'])?>==2){
							//反向动画效果
							setTimeout(function(){
								setTimeout(function(){
									$(".last_success").show();//大局赢
									del_localStorage();

									//大局赢之后ajax对方 gameout=2 成功之后5秒转背包
									$.ajax({
										url:'index.php?ctl=game&act=ajaxgameout',
										type:'POST',
										async: false,
										data: 'deal_id='+ data_id +'&type=888&rnum='+ Math.random(),
										dataType: "json",
										success: function(data){
											console.log(data);
											setTimeout(function(){
												window.location.href="index.php?ctl=user_center";											
											},5000);
										},
										error: function(){
											//alert("系统错误，请联系管理员");
										}
									});
									
								},1500);
							},1500);
						}else{
							//反向动画效果
							setTimeout(function(){
								setTimeout(function(){
									$(".said_success").show();//大赢
									del_localStorage();
									
									//大赢之后ajax对方 gameout=2 等待下一轮匹配
									$.ajax({
										url:'index.php?ctl=game&act=ajaxgameout',
										type:'POST',
										async: false,
										data: 'deal_id='+ data_id +'&type=8&rnum='+ Math.random(),
										dataType: "json",
										success: function(data){
											//等待房间内所有选手完成比赛，然后重新匹配
										},
										error: function(){
											//alert("系统错误，请联系管理员");
										}
									});	
									
								},1500);
							},1500);	
						}
						return;
					}
					//alert('此战赢，等待监听上报结果');
					//反向动画效果
					setTimeout(function(){
						setTimeout(function(){
							$(".huihe_success").show();//小赢
						},1500);
					},1500);
				},5000);	
			}
		}
		//清空本地 localStorage
		function del_localStorage(){
			localStorage.zhan=1;
			localStorage.ying=0;
			localStorage.shu=0;
			localStorage.donghua=0;
			localStorage.fangqi=0;
		}
		</script>

	<!--neirong end-->
	
	<div class="huihe huihe_success" style="display:none;">
		<img src="youxi/images/rzjh.png" style="margin:50px auto 0;" alt="" width="90"/>
		<div class="mar-t-10"><span class="color-yellow mar-r-10"><?=$this->_var['data']['saiduan_num']/2?>/<?=$this->_var['data']['saiduan_num']?>赛段</span>第<span id="huihe_num1">null</span>回合</div>
		<div class="f14">本赛段下一回合游戏马上开始</div>
	</div>
	<!--回合胜利end-->
	
	<div class="huihe huihe_lose" style="display:none;">
		<img src="youxi/images/rzjh.png" style="margin:50px auto 0;" alt="" width="90"/>
		<div class="mar-t-10"><span class="color-yellow mar-r-10"><?=$this->_var['data']['saiduan_num']/2?>/<?=$this->_var['data']['saiduan_num']?>赛段</span>第<span id="huihe_num2">null</span>回合</div>
		<div class="f14">本赛段下一回合游戏马上开始</div>
	</div>
	<!--回合失败end-->
	
	<div class="huihe said_success" style="height:290px;display:none;">
		<img src="youxi/images/rzjh.png"style="margin:130px auto 0;" alt="" width="70"/>
		<div class="mar-t-10">正在匹配<img src="youxi/images/shuaxin.gif" style="display:inline-block; vertical-align:middle;"alt="" width="40"/></div>
		<div class="f14"><span class="color-yellow mar-r-10"><?=$this->_var['data']['saiduan_num']/4?>/<?=$this->_var['data']['saiduan_num']/2?>赛段</span>游戏马上开始</div>
	</div>
	<!--赛段胜利end-->
	
	<div class="huihe said_stop" style="height:260px;display:none;">
		<img src="youxi/images/jiu.png" style="margin:100px auto 0;" alt="" width="70"/>
		<div class="f14">-<?=$this->_var['data']['game']['origin_price']/$this->_var['data']['game']['max_buy']?>积分</div>
		<div class="f24">请您再接再励</div>
	</div>
	<!--赛段止步-->
	
	<div class="huihe last_success" style="height:280px; display:none;">
		<div class="f16" style="margin-top:110px;">恭喜获得</div>
		<img src="youxi/images/jiu.png" style="margin:0 auto" alt="" width="70"/>
		<div class="f16 mar-t-10"><?=$this->_var['data']['game']['name']?></div>
	</div>
	<!--最终胜利-->
</div>  
   
</body>
</html>